<!doctype html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../css/style.css" />		
		<script type="text/javascript" src="../js/head_public.js" ></script>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav ding-bar">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">我的钱包</h1>
		</header>
		<div class="mui-content">
			<div class="kabao-container">
				<div class="ka-jifen">
					<img src="../images/qianbao1.png" />
					<div>我的积分</div>
					<p id="points">300分</p>
				</div>
				<div class="biaohao-container">
					<img src="../images/qianbao2.png"/>
					<div>电梯卡</div>
					<div class="bianhao">
						<div class="biaohao-div"><span id="bianhao" style="display: block;overflow: hidden;">编号：ASDFG123456</span>
							<!--<img src="../images/kabao-sanjiao.png" class="sanjiao" />-->
						</div>
					    <!--<ul class="kaohao-list">
					   	   <li>ASDFG111111</li>
					   	   <li>ASDFG222222</li>
					   	   <li>ASDFG333333</li>
					    </ul>-->
					</div>
					<p id="time">到期时间：暂无到期时间</p>
				</div>
				
			</div>
		    <div class="kong"></div>
			<ul class="mui-table-view mui-table-view-chevron geren-list">
				<li class="mui-table-view-cell kabao-icon1">
					<a data-href="jifenlist.html" class="mui-navigate-right">积分消费记录</a>
				</li>
				<li class="mui-table-view-cell kabao-icon2">
					<a data-href="jiaofei.html" class="mui-navigate-right">电梯缴费</a>
				</li>
			</ul>
			<div class="kong"></div>
			<ul class="mui-table-view mui-table-view-chevron geren-list">
				<li class="mui-table-view-cell kabao-icon3">
					<a data-href="../guanli/diantiinfo.html" class="mui-navigate-right">绑定电梯卡</a>
				</li>
			</ul>
			<div class="kong"></div>
			<ul class="mui-table-view mui-table-view-chevron geren-list">
				<li class="mui-table-view-cell kabao-icon4">
					<a data-href="jiaofei-list.html" class="mui-navigate-right">缴费记录</a>
				</li>
			</ul>
		</div>
		<script src="../js/mui.min.js"></script>
		<script src="../js/jquery-1.8.0.min.js"></script>
		<script src="../js/common.js"></script>
		<script src="../js/session.js"></script>
		<script type="text/javascript">
//			mui(".biaohao-container").on("tap",".biaohao-div",function(){
//				$(".kaohao-list").show();
//			})
//			mui(".biaohao-container").on("tap",".kaohao-list li",function(){
//				$("#bianhao").html("编号："+$(this).html());
//				$(".kaohao-list").hide();
//			})
			mui(".geren-list").on("tap","a[data-href]",function(){
				mui.openWindow({url:$(this).attr("data-href")})
			})
			
				var userid=getCookie("userid");
				if(userid==null||userid==""){
					alert("您还没有登录，请先登录")
					mui.openWindow({url:"../public/login.html"})
				}else{
					var param={};
					param.member_id=userid;
					$.post(net+"/public/index.php?s=api/Predeposit",param,function(res){
						if(res.code=="200"){
							if(res.result.check=="1"){
								if(res.result.member_code!=null&&res.result.member_code!=""){
									$("#bianhao").html("编号："+res.result.member_code)
									if(res.result.elevator_endtime!=""&&res.result.elevator_endtime!=null&&typeof(res.result.elevator_endtime)!=undefined){
										$("#time").html("到期时间："+res.result.elevator_endtime)
									}									
								}
								$("#points").html(res.result.member_points+"分")
							}else{
								if(confirm("您还没有填写电梯资料，现在去绑定电梯吗？")){
									location.href="../guanli/diantiinfo.html"
								}else{
									location.href="../public/index.html"
								}
							}
						}else if(res.code=="1005"){
							if(confirm("您还没有填写电梯资料，现在去绑定电梯吗？")){
								location.href="../guanli/diantiinfo.html"
							}else{
								location.href="../public/index.html"
							}
							
						}
					})
				}
			
		</script>
	</body>
</html>